var fs = require('fs');

var readFile = function (filename) {
    return new Promise(function (resovle, reject) {
        fs.readFile(filename, function(error, data) {
            if (error) reject(error);
            resovle(data);
        });
    });
}

var asyncReadFile = async function (filename) {
    var f_data = await readFile(filename);
    console.log('in' + f_data.toString());
    return f_data.toString();
}

var result = asyncReadFile('package.json');
console.log(result.then((res)=>(console.log(res))));